import React, { useState } from 'react';
import { Button, Modal, Select, Input, Tabs } from 'antd';
import From from './From';
import MoreActron from './MoreActron';
import ReissueCard from './ReissueCard';
import CompanyParameter from "../../config/BasicInformation/CompanyParameter";
import CabinetLock from "../../config/BasicInformation/CabinetLock";
import Partition from "../../config/BasicInformation/Partition";
const CabinetModel = ({ setIsModalOpen, isModalOpen, ItemData,UpdateList }) => {


  console.log(ItemData)

  const title = (
    <div>
      <div>柜号 {ItemData.locker_number}</div>
    </div>
  )




  const a = () => { 
    return (
      <div style={{fontSize:16,fontWeight:'bold'}}>
       授权操作
      </div>
    )
  }
  const a1 = () => { 
    return (
      <div style={{fontSize:16,fontWeight:'bold'}}>
       补卡
      </div>
    )
  }
    const a2 = () => { 
    return (
      <div style={{fontSize:16,fontWeight:'bold'}}>
       更多操作
      </div>
    )
  }

  return (
    <>

      <Modal
        title={title}
        closable={{ 'aria-label': 'Custom Close Button' }}
        visible={isModalOpen}
        footer={null}
        onCancel={() => setIsModalOpen(false)}
        width={630}
      >
    <div >

        <Tabs style={{padding:"12px !important"}} tabPosition="top" defaultActiveKey="app">
            <Tabs.TabPane tab={a()} key="app">
                <From ItemData={ItemData} />
            </Tabs.TabPane>
            <Tabs.TabPane tab={a1()} key="service">
                <ReissueCard ItemData={ItemData} />
            </Tabs.TabPane>
            <Tabs.TabPane tab={a2()} key="partition">
                <MoreActron UpdateList={UpdateList} setIsModalOpen={setIsModalOpen}ItemData={ItemData} />
            </Tabs.TabPane>
        </Tabs>
    </div>

      </Modal>
    </>
  );
};

export default CabinetModel;